From: Cédric Bosdonnat Date: Mon, 28 Nov 2016 13:53:57 +0000 (+0100) Subject: libxl: invert xc and domain model resume calls in xc_domain_resume() X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~3262 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=f33b4fc4efc11a45184a8a368bd3a6bdb6b01dd0;p=xen.git libxl: invert xc and domain model resume calls in xc_domain_resume() Resume is sometimes silently failing for HVM guests. Getting the xc_domain_resume() and libxl__domain_resume_device_model() in the reverse order than what is in the suspend code fixes the problem. Signed-off-by: Cédric Bosdonnat Acked-by: Wei Liu [ wei: rebase it on top of staging ] Signed-off-by: Wei Liu --- diff --git a/tools/libxl/libxl_dom_suspend.c b/tools/libxl/libxl_dom_suspend.c index d258a1c8dc..6314a001d1 100644 --- a/tools/libxl/libxl_dom_suspend.c +++ b/tools/libxl/libxl_dom_suspend.c @@ -456,12 +456,6 @@ int libxl__domain_resume(libxl__gc *gc, uint32_t domid, int suspend_cancel) { int rc = 0; - if (xc_domain_resume(CTX->xch, domid, suspend_cancel)) { - LOGED(ERROR, domid, "xc_domain_resume failed"); - rc = ERROR_FAIL; - goto out; - } - libxl_domain_type type = libxl__domain_type(gc, domid); if (type == LIBXL_DOMAIN_TYPE_INVALID) { rc = ERROR_FAIL; @@ -476,6 +470,12 @@ int libxl__domain_resume(libxl__gc *gc, uint32_t domid, int suspend_cancel) } } + if (xc_domain_resume(CTX->xch, domid, suspend_cancel)) { + LOGED(ERROR, domid, "xc_domain_resume failed"); + rc = ERROR_FAIL; + goto out; + } + if (!xs_resume_domain(CTX->xsh, domid)) { LOGED(ERROR, domid, "xs_resume_domain failed"); rc = ERROR_FAIL;